import request from '~/utils/request'

export default{
  // 创建订单
  createOrder(courseId) {
    return request({
      url: `/api/order/trade-order/auth/createOrder/${courseId}`,
      method: 'post'
    })
  },
  // 获取订单信息
  getOrderInfo(orderId) {
    return request({
      url: `/api/order/trade-order/auth/getOrder/${orderId}`,
      method: 'get'
    })
  },
  // 判断订单状态
  ifState(courseId) {
    return request({
      url: `/api/order/trade-order/auth/getOrderState/${courseId}`,
      method: 'get'
    })
  }
}
